package com.jin.spirng_boot_learn.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import org.springframework.web.context.support.RequestHandledEvent;

@Component
public class ApplicationRequestHandledListener implements ApplicationListener<RequestHandledEvent> {

    @Override
    public void onApplicationEvent(RequestHandledEvent event) {
        System.out.println(event.getSource());
        System.out.println(event.getDescription());
//        System.out.println("每一个request都会触发");
    }
}
